<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div class="box">
        
    </div>


    <script>

        var arr=[
            './img/1.jpg',
            './img/2.jpg',
            './img/3.jpg',
            './img/4.jpg'
        ]
        var arr1=[
            './img/7.jpg',
            './img/6.jpg',
            './img/5.jpg',
            './img/4.jpg'
        ]

        function Big(obj){
            Object.assign(this,obj)
            this.init();
        }
        Big.prototype={
            constructor:Big,

            init:function(){
                this.move();
            },
            move:function(){
                var that=this;
                this.box.innerHTML=that.arr.map(function(v,i){
                    return `<span>${v.url}</span>`
                }).join(''); 
            }
        }
        new Big({
            box:document.querySelector('.box'),
            arr:arr
        })
        new Big({
            box:document.querySelector('.box'),
            arr1:arr1
        })
    </script>
</body>
</html>


